
let express = require('express');
let router =  express.Router();
let enjoylove = require("../../app/controller/prod/enjoylove");


/***********************辅导管理*************************/
router.post("/instructor/list",enjoylove.getInstructorList);
router.post("/instructor/add",enjoylove.addInstructor);
router.post("/instructor/update",enjoylove.updateInstructor);
router.post("/instructor/areas",enjoylove.getInstructorAreas);

/***********************客户管理*************************/
router.post("/customer/list",enjoylove.getCustomerList);


/***********************商品管理*************************/
router.post("/product/list",enjoylove.getProductList);
var upload = require('../../app/controller/prod/upload/fileupload');
router.post("/product/uploadProduct",upload.single('file'),enjoylove.uploadProduct);

router.post("/product/deleteProductPicture",enjoylove.deleteProductPicture);
router.post("/product/deleteProductCategory",enjoylove.deleteProductCategory);
router.post("/product/addProductCategory",enjoylove.addProductCategory);
router.post("/product/productCategoryList",enjoylove.productCategoryList);
router.post("/product/productAnyCategoryList",enjoylove.productAnyCategoryList);
router.post("/product/addProductPicture",upload.single('file'),enjoylove.addProductPicture);
router.post("/product/editProduct",enjoylove.editProduct);
router.post("/product/editProductUnit",enjoylove.editProductUnit);
router.post("/product/getProduct",enjoylove.getProduct);

/***********************分类管理*************************/
router.post("/category/list",enjoylove.getCategoryList);
router.post("/category/addCategory",enjoylove.addCategory);
router.post("/category/updateCategory",enjoylove.updateCategory);

/***********************订单管理*************************/
router.post("/order/list",enjoylove.getOrderList);
router.post("/order/OrderStatuslist",enjoylove.getOrderStatusList);
router.post("/order/OrderDetail",enjoylove.getOrderDetailByID);
router.post("/order/confirmOrder",upload.single('file'),enjoylove.confirmOrder);
router.post("/order/uploadOrderPic",upload.single('file'),enjoylove.uploadOrderPic);

module.exports = router;

